package com.i_art_engineer.meigong.widget;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;

import com.i_art_engineer.meigong.R;

/**
 * Created by quan on 2016/6/28.
 */
public class CustomProgressDialog extends ProgressDialog {
    public CustomProgressDialog(Context context) {
        super(context);
    }

    public CustomProgressDialog(Context context, int theme) {
        super(context, theme);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if(Build.VERSION.SDK_INT>22){
            setContentView(R.layout.view_tips_loading1);
        }else{
            setContentView(R.layout.view_tips_loading2);
        }

    }

    public static CustomProgressDialog show(Context ctx){
        CustomProgressDialog d = new CustomProgressDialog(ctx);
        d.show();
        return d;
    }
}
